package OperateurSystem;

/**
 * Interface definition : GestionAuthentification
 * 
 * @author OpenORB Compiler
 */
public class _GestionAuthentificationStub extends org.omg.CORBA.portable.ObjectImpl
        implements GestionAuthentification
{
    static final String[] _ids_list =
    {
        "IDL:OperateurSystem/GestionAuthentification:1.0"
    };

    public String[] _ids()
    {
     return _ids_list;
    }

    private final static Class _opsClass = OperateurSystem.GestionAuthentificationOperations.class;

    /**
     * Operation adhesionA
     */
    public int adhesionA(String nomAdherent, int infosBancairesAdh, int idStation, String adresse)
        throws OperateurSystem.GestionAuthentificationPackage.ClientExistantException
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try
                {
                    org.omg.CORBA.portable.OutputStream _output = this._request("adhesionA",true);
                    _output.write_string(nomAdherent);
                    _output.write_long(infosBancairesAdh);
                    _output.write_long(idStation);
                    _output.write_string(adresse);
                    _input = this._invoke(_output);
                    int _arg_ret = _input.read_long();
                    return _arg_ret;
                }
                catch(org.omg.CORBA.portable.RemarshalException _exception)
                {
                    continue;
                }
                catch(org.omg.CORBA.portable.ApplicationException _exception)
                {
                    String _exception_id = _exception.getId();
                    if (_exception_id.equals(OperateurSystem.GestionAuthentificationPackage.ClientExistantExceptionHelper.id()))
                    {
                        throw OperateurSystem.GestionAuthentificationPackage.ClientExistantExceptionHelper.read(_exception.getInputStream());
                    }

                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                }
                finally
                {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("adhesionA",_opsClass);
                if (_so == null)
                   continue;
                OperateurSystem.GestionAuthentificationOperations _self = (OperateurSystem.GestionAuthentificationOperations) _so.servant;
                try
                {
                    return _self.adhesionA( nomAdherent,  infosBancairesAdh,  idStation,  adresse);
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Operation adhesionF
     */
    public int adhesionF(String nomAdherent, String adresse, int infosBancaires)
        throws OperateurSystem.GestionAuthentificationPackage.ClientExistantException
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try
                {
                    org.omg.CORBA.portable.OutputStream _output = this._request("adhesionF",true);
                    _output.write_string(nomAdherent);
                    _output.write_string(adresse);
                    _output.write_long(infosBancaires);
                    _input = this._invoke(_output);
                    int _arg_ret = _input.read_long();
                    return _arg_ret;
                }
                catch(org.omg.CORBA.portable.RemarshalException _exception)
                {
                    continue;
                }
                catch(org.omg.CORBA.portable.ApplicationException _exception)
                {
                    String _exception_id = _exception.getId();
                    if (_exception_id.equals(OperateurSystem.GestionAuthentificationPackage.ClientExistantExceptionHelper.id()))
                    {
                        throw OperateurSystem.GestionAuthentificationPackage.ClientExistantExceptionHelper.read(_exception.getInputStream());
                    }

                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                }
                finally
                {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("adhesionF",_opsClass);
                if (_so == null)
                   continue;
                OperateurSystem.GestionAuthentificationOperations _self = (OperateurSystem.GestionAuthentificationOperations) _so.servant;
                try
                {
                    return _self.adhesionF( nomAdherent,  adresse,  infosBancaires);
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Operation obtenirStation
     */
    public int obtenirStation(short adherentDestinataire)
        throws OperateurSystem.GestionAuthentificationPackage.ClientInexistantException
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try
                {
                    org.omg.CORBA.portable.OutputStream _output = this._request("obtenirStation",true);
                    _output.write_short(adherentDestinataire);
                    _input = this._invoke(_output);
                    int _arg_ret = _input.read_long();
                    return _arg_ret;
                }
                catch(org.omg.CORBA.portable.RemarshalException _exception)
                {
                    continue;
                }
                catch(org.omg.CORBA.portable.ApplicationException _exception)
                {
                    String _exception_id = _exception.getId();
                    if (_exception_id.equals(OperateurSystem.GestionAuthentificationPackage.ClientInexistantExceptionHelper.id()))
                    {
                        throw OperateurSystem.GestionAuthentificationPackage.ClientInexistantExceptionHelper.read(_exception.getInputStream());
                    }

                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                }
                finally
                {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("obtenirStation",_opsClass);
                if (_so == null)
                   continue;
                OperateurSystem.GestionAuthentificationOperations _self = (OperateurSystem.GestionAuthentificationOperations) _so.servant;
                try
                {
                    return _self.obtenirStation( adherentDestinataire);
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Operation verifIdentifiantsA
     */
    public void verifIdentifiantsA(int idAdherent)
        throws OperateurSystem.GestionAuthentificationPackage.ClientInexistantException
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try
                {
                    org.omg.CORBA.portable.OutputStream _output = this._request("verifIdentifiantsA",true);
                    _output.write_long(idAdherent);
                    _input = this._invoke(_output);
                    return;
                }
                catch(org.omg.CORBA.portable.RemarshalException _exception)
                {
                    continue;
                }
                catch(org.omg.CORBA.portable.ApplicationException _exception)
                {
                    String _exception_id = _exception.getId();
                    if (_exception_id.equals(OperateurSystem.GestionAuthentificationPackage.ClientInexistantExceptionHelper.id()))
                    {
                        throw OperateurSystem.GestionAuthentificationPackage.ClientInexistantExceptionHelper.read(_exception.getInputStream());
                    }

                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                }
                finally
                {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("verifIdentifiantsA",_opsClass);
                if (_so == null)
                   continue;
                OperateurSystem.GestionAuthentificationOperations _self = (OperateurSystem.GestionAuthentificationOperations) _so.servant;
                try
                {
                    _self.verifIdentifiantsA( idAdherent);
                    return;
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Operation verifIdentifiantsF
     */
    public void verifIdentifiantsF(int idFrs)
        throws OperateurSystem.GestionAuthentificationPackage.ClientInexistantException
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try
                {
                    org.omg.CORBA.portable.OutputStream _output = this._request("verifIdentifiantsF",true);
                    _output.write_long(idFrs);
                    _input = this._invoke(_output);
                    return;
                }
                catch(org.omg.CORBA.portable.RemarshalException _exception)
                {
                    continue;
                }
                catch(org.omg.CORBA.portable.ApplicationException _exception)
                {
                    String _exception_id = _exception.getId();
                    if (_exception_id.equals(OperateurSystem.GestionAuthentificationPackage.ClientInexistantExceptionHelper.id()))
                    {
                        throw OperateurSystem.GestionAuthentificationPackage.ClientInexistantExceptionHelper.read(_exception.getInputStream());
                    }

                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                }
                finally
                {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("verifIdentifiantsF",_opsClass);
                if (_so == null)
                   continue;
                OperateurSystem.GestionAuthentificationOperations _self = (OperateurSystem.GestionAuthentificationOperations) _so.servant;
                try
                {
                    _self.verifIdentifiantsF( idFrs);
                    return;
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Operation seConnecterA
     */
    public void seConnecterA(int idAdherent, String IOR)
        throws OperateurSystem.GestionAuthentificationPackage.ClientInexistantException
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try
                {
                    org.omg.CORBA.portable.OutputStream _output = this._request("seConnecterA",true);
                    _output.write_long(idAdherent);
                    _output.write_string(IOR);
                    _input = this._invoke(_output);
                    return;
                }
                catch(org.omg.CORBA.portable.RemarshalException _exception)
                {
                    continue;
                }
                catch(org.omg.CORBA.portable.ApplicationException _exception)
                {
                    String _exception_id = _exception.getId();
                    if (_exception_id.equals(OperateurSystem.GestionAuthentificationPackage.ClientInexistantExceptionHelper.id()))
                    {
                        throw OperateurSystem.GestionAuthentificationPackage.ClientInexistantExceptionHelper.read(_exception.getInputStream());
                    }

                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                }
                finally
                {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("seConnecterA",_opsClass);
                if (_so == null)
                   continue;
                OperateurSystem.GestionAuthentificationOperations _self = (OperateurSystem.GestionAuthentificationOperations) _so.servant;
                try
                {
                    _self.seConnecterA( idAdherent,  IOR);
                    return;
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Operation seConnecterF
     */
    public void seConnecterF(int idFrs, String IOR)
        throws OperateurSystem.GestionAuthentificationPackage.ClientInexistantException
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try
                {
                    org.omg.CORBA.portable.OutputStream _output = this._request("seConnecterF",true);
                    _output.write_long(idFrs);
                    _output.write_string(IOR);
                    _input = this._invoke(_output);
                    return;
                }
                catch(org.omg.CORBA.portable.RemarshalException _exception)
                {
                    continue;
                }
                catch(org.omg.CORBA.portable.ApplicationException _exception)
                {
                    String _exception_id = _exception.getId();
                    if (_exception_id.equals(OperateurSystem.GestionAuthentificationPackage.ClientInexistantExceptionHelper.id()))
                    {
                        throw OperateurSystem.GestionAuthentificationPackage.ClientInexistantExceptionHelper.read(_exception.getInputStream());
                    }

                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                }
                finally
                {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("seConnecterF",_opsClass);
                if (_so == null)
                   continue;
                OperateurSystem.GestionAuthentificationOperations _self = (OperateurSystem.GestionAuthentificationOperations) _so.servant;
                try
                {
                    _self.seConnecterF( idFrs,  IOR);
                    return;
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

    /**
     * Operation connectionStation
     */
    public void connectionStation(int noZone, int idStation)
        throws OperateurSystem.GestionAuthentificationPackage.ZoneInexistanteException
    {
        while(true)
        {
            if (!this._is_local())
            {
                org.omg.CORBA.portable.InputStream _input = null;
                try
                {
                    org.omg.CORBA.portable.OutputStream _output = this._request("connectionStation",true);
                    _output.write_long(noZone);
                    _output.write_long(idStation);
                    _input = this._invoke(_output);
                    return;
                }
                catch(org.omg.CORBA.portable.RemarshalException _exception)
                {
                    continue;
                }
                catch(org.omg.CORBA.portable.ApplicationException _exception)
                {
                    String _exception_id = _exception.getId();
                    if (_exception_id.equals(OperateurSystem.GestionAuthentificationPackage.ZoneInexistanteExceptionHelper.id()))
                    {
                        throw OperateurSystem.GestionAuthentificationPackage.ZoneInexistanteExceptionHelper.read(_exception.getInputStream());
                    }

                    throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: "+ _exception_id);
                }
                finally
                {
                    this._releaseReply(_input);
                }
            }
            else
            {
                org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("connectionStation",_opsClass);
                if (_so == null)
                   continue;
                OperateurSystem.GestionAuthentificationOperations _self = (OperateurSystem.GestionAuthentificationOperations) _so.servant;
                try
                {
                    _self.connectionStation( noZone,  idStation);
                    return;
                }
                finally
                {
                    _servant_postinvoke(_so);
                }
            }
        }
    }

}
